home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / pascal / install.emx < prev    next >
Text File  |  1994-10-29  |  14KB  |  419 lines

  1. ===============================================================================
  2. install.doc       emx 0.8h     INSTALLATION GUIDE                   14-Dec-1993
  3. ===============================================================================
  4.                                      Copyright (c) 1990-1993 by Eberhard Mattes
  5.  
  6. Welcome to emx 0.8h, an environment for creating 32-bit programs for
  7. OS/2 2.x (and DOS).  You can use the GNU C compiler for compiling
  8. programs.
  9.  
  10. To use the GNU C compiler with emx, you need at least
  11.  
  12.   emxrt.zip     emx runtime package
  13.  
  14.   emxdev.zip    files required for developing programs with emx
  15.  
  16.   gnudev.zip    the GNU C compiler, the GNU debugger, and other tools
  17.                 (it should also be possible to use a different C compiler;
  18.                 in fact I first used the Xenix386 C compiler)
  19.  
  20.   gppdev.zip    additional files for GCC required for compiling C++
  21.                 programs
  22.  
  23.   gobjcdev.zip  additional files for GCC required for compiling
  24.                 programs written in the Objective C language
  25.  
  26. and
  27.  
  28.   unzip.exe     a free program for unpacking ZIP files
  29.  
  30. The following packages are optional:
  31.  
  32.   emxview.zip   emx documentation in OS/2 .inf format
  33.   emxlib.zip    emx library sources
  34.   emxsrc1.zip   source for emxomf, emxomfar, emxomfld, emxexp and emxload
  35.   emxample.zip  sample programs
  36.   emxtest.zip   test programs (used for testing emx and the libraries)
  37.   gnuview.zip   gnudev.inf (gnudev.doc in OS/2 .inf format)
  38.   gnudoc.zip    documentation for GNU programs (texinfo sources)
  39.   gnuinfo.zip   GNU texinfo (includes info file browser)
  40.   gnupat.zip    patches for GNU sources
  41.   gnusrc.zip    patched GNU sources (ld, ar, nm, size, strip, objdump,
  42.                 info, termcap, GPPDEMID)
  43.   gccsrc1.zip   patched GNU sources (gcc 2.5.7, part 1)
  44.   gccsrc2.zip   patched GNU sources (gcc 2.5.7, part 2)
  45.   gccsrc3.zip   patched GNU sources (gcc 2.5.7, part 3)
  46.   gassrc.zip    patched GNU sources (gas 1.38.1)
  47.   gdbsrc1.zip   patched GNU sources (gdb 4.11, part 1)
  48.   gdbsrc2.zip   patched GNU sources (gdb 4.11, part 2)
  49.   gppsrc.zip    patched sources of libg++ 2.5.2
  50.   bsddev.zip    BSD libraries (curses etc.)
  51.   bsddoc.zip    documentation for BSD libraries
  52.   bsdsrc.zip    source for BSD libraries
  53.  
  54. You should install all the packages on the same drive.  For instance,
  55. use
  56.  
  57.   c:
  58.   cd \
  59.   unzip emxrt
  60.  
  61. to install the emxrt.zip package on drive C:.  PKUNZIP cannot be
  62. used.  All the files will be installed in the \emx subdirectory or in
  63. subdirectories thereof.  The other packages are installed the same
  64. way.
  65.  
  66. IMPORTANT!  If there's an older version of emx already installed, you
  67. should delete the old version or rename the old directory.  Installing
  68. a new version over an old version is NOT RECOMMENDED.  For instance,
  69. the omflib batch file (see below) won't build new versions of the
  70. libraries if the .lib files already exist.  That is, you would
  71. continue to use the .lib files of the previously installed emx
  72. version.
  73.  
  74. After unpacking the emx runtime and development system packages,
  75. you'll find further information in the following files:
  76.  
  77.   \emx\doc\COPYING.EMX          emx & library license
  78.   \emx\doc\COPYING              GNU General Public License
  79.   \emx\doc\install.doc          Installation guide
  80.   \emx\doc\emxrt.doc            User's guide to the emx runtime package
  81.   \emx\doc\emxdev.doc           Application developer's guide
  82.   \emx\doc\libref.doc           C library reference
  83.   \emx\doc\build.doc            Compiling the GNU sources
  84.   \emx\doc\history.doc          Change log
  85.   \emx\doc\future.doc           Things to do
  86.   \emx\book\emxrt.inf           .inf version of emxrt.doc
  87.   \emx\book\emxdev.inf          .inf version of emxdev.doc (optional)
  88.   \emx\book\libref.inf          .inf version of libref.doc (optional)
  89.  
  90. After unpacking the GNU and BSD packages, you'll find further
  91. information in the following files:
  92.  
  93.   \emx\doc\COPYING              GNU General Public License
  94.   \emx\doc\COPYING.LIB          GNU Library General Public License
  95.   \emx\doc\COPYING.BSD          BSD license (for libraries bsd and curses)
  96.   \emx\doc\COPYING.IOS          Additional information for iostream library
  97.   \emx\doc\gnudev.doc           GNU development tools information
  98.   \emx\doc\bsddev.doc           BSD library information
  99.   \emx\book\gnudev.inf          .inf version of gnudev.doc (optional)
  100.   \emx\book\bsddev.inf          .inf version of bsddev.doc
  101.  
  102.  
  103. Read history.doc first.
  104.  
  105. If you want to develop programs on a drive different from the drive
  106. where emx is installed, you have to set the C_INCLUDE_PATH and
  107. LIBRARY_PATH environment variables, for instance,
  108.  
  109.     set C_INCLUDE_PATH=c:/emx/include
  110.     set LIBRARY_PATH=c:/emx/lib
  111.  
  112. If you want to compile C++ programs, set CPLUS_INCLUDE_PATH as well:
  113.  
  114.     set CPLUS_INCLUDE_PATH=c:/emx/include.cpp;c:/emx/include
  115.  
  116. The genclass utility needs the following environment variable:
  117.  
  118.     set PROTODIR=c:/emx/include.cpp/gen
  119.  
  120. If you want to compile programs written in the Objective C language,
  121. set OBJC_INCLUDE_PATH as well:
  122.  
  123.     set OBJC_INCLUDE_PATH=c:/emx/include
  124.  
  125. When compiling projects consisting of many modules (such as libraries)
  126. under OS/2, you can speed up compilation if you have enough memory by
  127. keeping GCC in memory.  For example, to keep GCC in memory for 5
  128. minutes, use
  129.  
  130.     set GCCLOAD=5
  131.  
  132. To use GDB (the GNU debugger) and info (the GNU info browser) and other
  133. programs that use termcap, set the TERM and TERMCAP environment
  134. variables:
  135.  
  136.     set TERM=mono
  137.     set TERMCAP=c:/emx/etc/termcap.dat
  138.  
  139. Set the INFOPATH environment variable for info:
  140.  
  141.     set INFOPATH=c:/emx/info
  142.  
  143. To use the emx documentation in OS/2 .inf format, append c:\emx\book
  144. to the BOOKSHELF environment variable and define an environment
  145. variable which tells VIEW how to concatenate the .inf files.  Example:
  146.  
  147.     set BOOKSHELF=C:\OS2\BOOK;C:\EMX\BOOK
  148.     set EMXBOOK=emxdev.inf+libref.inf+gnudev.inf+bsddev.inf
  149.  
  150. To use the .inf files with EPM (the OS/2 Enhanced Editor), add the
  151. following line to your config.sys file:
  152.  
  153.     set HELPNDX=emxbook.ndx
  154.  
  155. If HELPNDX is already set in your config.sys file, add emxbook.ndx to
  156. the end of the HELPNDX variable, separated by a + character.
  157. Moreover, you should add c:\emx\book to the DPATH environment
  158. variable:
  159.  
  160.     set DPATH=...;c:\emx\book
  161.  
  162. where ... is the previous value of DPATH.
  163.  
  164. OS/2 users should set the environment variables in config.sys, DOS
  165. users should set the environment variables in autoexec.bat.  Beware of
  166. blanks at the end of the lines!
  167.  
  168. Some of the emx batch files (such as texi2dvi.cmd) require REXX to be
  169. installed.  If you haven't installed REXX, use Selective Install to
  170. install it.  (Note to DOS users: REXX is OS/2's batch file language.)
  171.  
  172. To finish the installation, add c:\emx\bin (insert the correct drive
  173. letter) to your PATH.  Add c:\emx\dll (insert the correct drive
  174. letter) to the LIBPATH statement in your config.sys file.  Reboot your
  175. computer to enable the new LIBPATH statement and the new environment
  176. variables.
  177.  
  178. After rebooting, you can create a folder containing icons for the
  179. on-line books by typing
  180.  
  181.     emxinst
  182.  
  183. To create the OMF libraries (for linking with LINK386), type the
  184. following commands after installing emx:
  185.  
  186.     cd \emx\lib
  187.     omflib
  188.  
  189. The omflib batch file builds .lib files from .a files.  Already
  190. existing .lib files are not rebuilt.  If you install (after running
  191. omflib) a package containing additional .a files , you should run
  192. omflib again to build the .lib files for the new package.
  193.  
  194. If OS/2 says
  195.  
  196.     SYS1804: The system cannot find the file EMX.
  197.  
  198. when running a program compiled for emx, you haven't set LIBPATH
  199. correctly.
  200.  
  201.  
  202. Compiling a sample program
  203. --------------------------
  204.  
  205. Install the emxample.zip package:
  206.  
  207.   c:
  208.   cd \
  209.   unzip emxample
  210.  
  211. Compile the sieve program (optimizer enabled):
  212.  
  213.   cd \emx\samples
  214.   gcc -O2 -o sieve.exe sieve.c
  215.  
  216. Run the sieve program:
  217.  
  218.   sieve
  219.   sieve 100000
  220.   sieve -p 100
  221.  
  222.  
  223. Sample debugging session
  224. ------------------------
  225.  
  226. Compile the sieve program for debugging:
  227.  
  228.   cd \emx\samples
  229.   gcc -g -o sieve.exe sieve.c
  230.  
  231. Start the debugger and step through some lines:
  232.  
  233.   [D:\EMX\TEST]gdb sieve.exe
  234.   GDB is free software and you are welcome to distribute copies of it
  235.    under certain conditions; type "show copying" to see the conditions.
  236.   There is absolutely no warranty for GDB; type "show warranty" for details.
  237.   GDB 4.11 (emx), Copyright 1993 Free Software Foundation, Inc...
  238.   (gdb) set arg 10                                      <- set command line
  239.   (gdb) b isqrt                                         <- set breakpoint
  240.   Breakpoint 1 at 0x1004e: file sieve.c, line 45.
  241.   (gdb) run                                             <- start program
  242.   Starting program: d:/emx/samples/sieve.exe 10
  243.  
  244.   Breakpoint 1, isqrt (x=10) at sieve.c:45
  245.   45        l = 1; r = x;
  246.   (gdb) s                                               <- stop over one line
  247.   46        while (l < r)
  248.   (gdb) l                                               <- list source
  249.   41      static ULONG isqrt (ULONG x)
  250.   42      {
  251.   43        ULONG l, r, m;
  252.   44      
  253.   45        l = 1; r = x;
  254.   46        while (l < r)
  255.   47          {
  256.   48            m = (l+r) / 2;
  257.   49            if (m > 46340) m = 46340;
  258.   50            if (m*m < x)
  259.   (gdb) disp l                                          <- watch variable
  260.   1: l = 1
  261.   (gdb) disp r                                          <- watch variable
  262.   2: r = 10
  263.   (gdb) s 5                                             <- step over five lines
  264.   53                  r = m-1;
  265.   2: r = 10
  266.   1: l = 1
  267.   (gdb) p m*m                                           <- show expression
  268.   $1 = 25
  269.   (gdb) cont                                            <- continue program
  270.   Continuing.
  271.   4 primes                                              <- output of program
  272.  
  273.  
  274.   Program exited normally.
  275.   (gdb) q                                               <- quit gdb
  276.  
  277.   [D:\EMX\TEST]
  278.  
  279.  
  280. Viewing OS/2 .inf files
  281. -----------------------
  282.  
  283. If you've installed the optional emxview.zip and gnuview.zip packages,
  284. you can use the OS/2 VIEW utility to view a hypertext version of
  285. emxdev.doc, libref.doc, gnudev.doc and bsddev.doc.  If you've added
  286. c:\emx\book to the BOOKSHELF environment variable and defined the
  287. EMXBOOK environment variable (see above), type
  288.  
  289.     view emxbook
  290.  
  291. to view the concatenated .inf files.  To get help for, say, printf(),
  292. type
  293.  
  294.     view emxbook printf
  295.  
  296. If you haven't set the environment variables, type
  297.  
  298.     view c:\emx\book\emxdev
  299.  
  300. to view emxdev.inf.
  301.  
  302. If you've properly set the HELPNDX and DPATH environment variables,
  303. you can use the kwhelp (Ctrl-H) command of EPM to get on-line help for
  304. the function at the cursor.  With emxbook.ndx, all three books are
  305. required to be installed.  If you haven't installed all the books, use
  306. a subset of emxdev.ndx, libref.ndx, gnudev.ndx and bsddev.ndx in the
  307. HELPNDX environment variable.
  308.  
  309. emxbook.ndx contains all entries of emxdev.ndx, libref.ndx, gnudev.ndx
  310. and bsddev.ndx, pointing to `emxbook'.  Setting the EMXBOOK
  311. environment variable as explained above causes the three books to be
  312. concatenated and named `emxbook'.
  313.  
  314.  
  315. Viewing the GNU on-line manuals
  316. -------------------------------
  317.  
  318. To view the GCC and GDB manuals, unpack gnudoc.zip and gnuinfo.zip and
  319. install info (see install.doc).  Use GNU makeinfo to create info files
  320. for on-line help from the texinfo files.  makeinf.bat and makeinf.cmd
  321. are batch files which simplify calling makeinfo.
  322.  
  323. To create info files for the GCC manual, type:
  324.  
  325.   cd \emx\gnu\doc
  326.   makeinf gcc
  327.   makeinf cpp
  328.  
  329. To create info files for the GDB manual, type:
  330.  
  331.   cd \emx\gnu\doc
  332.   makeinf gdb
  333.  
  334. To create info files for the texinfo manual, type:
  335.  
  336.   cd \emx\gnu\doc
  337.   makeinf texi
  338.   makeinf makeinfo
  339.  
  340. To create info files for libg++, type:
  341.  
  342.   cd \emx\gnu\doc
  343.   makeinf libgpp
  344.   makeinf iostream
  345.  
  346. After creating the info files, you can use GNU info (see gnudev.doc
  347. for details) or GNU Emacs to view the info files.
  348.  
  349.  
  350. Printing the GNU manuals
  351. ------------------------
  352.  
  353. To print the manuals, you have to unpack gnudoc.zip and gnuinfo.zip.
  354. Additionally, you have to install TeX.  Of course, I recommend emTeX,
  355. which can be used both under OS/2 and DOS.  emTeX is available for
  356. anonymous ftp on
  357.  
  358.   ftp.uni-stuttgart.de   [129.69.8.13]: /pub/tex/systems/msdos/emtex
  359.   ftp.tex.ac.uk        [134.151.44.19]: /pub/archive/systems/msdos/emtex
  360.   ftp.shsu.edu         [192.92.115.10]: /tex-archive/systems/msdos/emtex
  361.   ftp.informatik.tu-muenchen.de [131.159.0.198]: /pub/comp/os/os2/emTeX
  362.  
  363. The following instructions assume that you're using emTeX (with
  364. emTeX386).
  365.  
  366. To typeset the GCC documentation, type
  367.  
  368.   cd \emx\gnu\doc
  369.   makedvi gcc
  370.  
  371. This creates the following files:
  372.  
  373.   cpp.dvi        GNU C preprocessor manual
  374.   gcc.dvi        GNU C compiler manual
  375.  
  376. To typeset the GDB documentation, type
  377.  
  378.   cd \emx\gnu\doc
  379.   makedvi gdb
  380.  
  381. This creates the following files:
  382.  
  383.   refcard.dvi    GDB reference card
  384.   gdb.dvi        GDB manual
  385.  
  386. To typeset internal GDB documentation (you don't need this unless you
  387. want to hack GDB), type
  388.  
  389.   cd \emx\gnu\doc
  390.   makedvi gdbint
  391.  
  392. This create the following files:
  393.  
  394.   gdbint.dvi     GDB internals
  395.   stabs.dvi      Description of debugging information format
  396.  
  397. To typeset the texinfo documentation, type
  398.  
  399.   cd \emx\gnu\doc
  400.   makedvi texinfo
  401.  
  402. This creates the following files:
  403.  
  404.   texi.dvi       texinfo manual
  405.   makeinfo.dvi   makeinfo manual
  406.  
  407. To typeset the libg++ and iostream documentation, type
  408.  
  409.   cd \emx\gnu\doc
  410.   makedvi libgpp
  411.   makedvi iostream
  412.  
  413. This creates the following files:
  414.  
  415.   libgpp.dvi     libg++ manual
  416.   iostream.dvi   iostream manual
  417.  
  418. --------------------------- END OF INSTALL.DOC ------------------------------
  419.